#ifndef MENUTOP_H
#define MENUTOP_H

#include <QWidget>
#include <QMouseEvent>
#include <QFont>
#include <QLabel>
#include <QApplication>
#include <QDesktopWidget>
#include <QHBoxLayout>
#include <QSpacerItem>
#include <QComboBox>

namespace Ui {
class MenuTop;
}

enum LabelNnum{
    LABEL_MAIN=0,
    LABEL_BLOG,
    LABEL_FRESH,
    LABEL_LOGIN,
    LABEL_USER,
    LABEL_MSG,
    LABEL_PUBLISH
};

class MenuTop : public QWidget
{
    Q_OBJECT

public:
    explicit MenuTop(QWidget *parent = nullptr);
    ~MenuTop();
    bool eventFilter(QObject *obj, QEvent *event);	// 添加时间过滤器声明
    void setPixLogin(QPixmap *pix);
    void setUser(QString user);
private:
    Ui::MenuTop *ui;
    QList<QLabel *> labelList;
    QHBoxLayout *layout;
    QLabel *labelMain;
    QLabel *labelBlog;
    QLabel *labelFresh;
    QLabel *labelLogin;
    QLabel *labelUser;
    QLabel *labelMsg;
    QLabel *labelPublish;
    QLabel *labelRes;
    QSpacerItem *spacer;
    QComboBox *comboBox;
signals:
    void signalLabelClicked(enum LabelNnum lnum);
    void signalTypeChanged(int type);
public slots:
    void comboChange(int idx);
};

#endif // MENUTOP_H
